package cn.wbnyua.resume.mvc.mapper;

import cn.wbnyua.resume.mvc.domain.Skills;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface SkillsMapper {

    @Select("select * from skills")
    List<Skills> findAll();
    @Select("select * from skills where id = #{id}")
    Skills findById(Long id);
    @Insert("insert into skills(`name`,level) values(#{name},#{level})")
    int add(Skills skills);

    @Update("update skills set `name` = #{name},level = #{level} where id = #{id}")
    int update(Skills skills);

    @Delete("delete from skills where id = #{id}")
    int remove(Long id);


}
